<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<%--家长端查询学生成绩并展示--%>
<head>
    <title>学生成绩</title>
    <link rel="stylesheet" href="./css/layui.css">
    <link rel="stylesheet" href="./css/style.css">
    <script src="./layui.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script language="javascript">
        function doPrint() {
            bdhtml = window.document.body.innerHTML;
            sprnstr = "<!--startprint-->";
            eprnstr = "<!--endprint-->";
            prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
            prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
            window.document.body.innerHTML = prnhtml;
            window.print();
        }

        function a() {
            $("#ddd").jqprint();
        }
    </script>
    <style type="text/css">
        @media print {
            .noprint {
                display: none;
            }
        }
    </style>
</head>
<body class="layui-layout-body" style="background-color: #F2F2F2">
<jsp:include page="/filterLogin.jsp"></jsp:include>
<jsp:include page="/WEB-INF/teacher/tHeader.jsp"></jsp:include>
<jsp:include page="/WEB-INF/teacher/teacherNav.jsp"></jsp:include>
<div class="layui-layout layui-layout-admin">
    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">
                <span class="layui-breadcrumb">
                    <a href="">家长端</a>
                    <a href="">课程信息</a>
                    <a><cite>成绩详情</cite></a>
                </span>
            <!--startprint-->
            <div class="content">
                <table class="layui-table" lay-filter="test">
                    <thead>
                    <tr>
                        <th>ID</th>
                        <th>学号</th>
                        <th>学生姓名</th>
                        <th>课程号</th>
                        <th>课程名</th>
                        <th>课程简介</th>
                        <th>家长号</th>
                        <th>家长</th>
                        <th>分数</th>
                    </tr>
                    </thead>

                    <c:forEach items="${selectcourses}" var="selectcourse" varStatus="s">
                        <tr style="height: 70px;">
                            <td>${s.count}</td>
                            <td>${selectcourse.s_id}</td>
                            <td>${selectcourse.s_name}</td>
                            <td>${selectcourse.c_id}</td>
                            <td>${selectcourse.c_name}</td>
                            <td>${selectcourse.c_info}</td>
                            <td>${selectcourse.t_id}</td>
                            <td>${selectcourse.t_name}</td>
                            <td>${selectcourse.score}</td>
                        </tr>
                    </c:forEach>
                </table>
                <input  class="noprint" type='button' name='button_export' title='打印' onclick=doPrint() value='打印'>
            </div>
            <!--endprint-->
            <jsp:include page="/footer.jsp"></jsp:include>
        </div>
    </div>
</div>


<script type="text/javascript">
    $("#nav li:nth-child(1) dl dd:nth-child(1)").addClass("layui-this");
    $("#nav li:nth-child(1)").addClass("layui-nav-itemed");
</script>
<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;
        element.init();
    });
</script>

</body>
</html>

